//
//  MapManager.mm
//  KiklinkApp
//
//  Created by LF on 14/10/31.
//  Copyright (c) 2014年 Kiklink. All rights reserved.
//

#import "MapManager.h"

NSString* const BAIDU_MAP_KEY = @"LYFLVD9IKKAQ22XfCA1GeXpV";

NSString* const BAIDU_MAP_TEST_KEY = @"MDllhVoxqToPOGaykUt8ffAG";


@implementation MapManager

-(MapManager*) initManager
{
    _BDMapManager = [[BMKMapManager alloc]init];
    
    BOOL ret = [_BDMapManager start:BAIDU_MAP_KEY  generalDelegate:self];
    if (!ret) {
        NSLog(@"manager start failed!");
    }
    return self;
}


/**
 *返回网络错误
 *@param iError 错误号
 */
- (void)onGetNetworkState:(int)iError
{
    if (0 == iError) {
        NSLog(@"联网成功");
    }
    else{
        NSLog(@"onGetNetworkState %d",iError);
    }
    
}

/**
 *返回授权验证错误
 *@param iError 错误号 : 为0时验证通过，具体参加BMKPermissionCheckResultCode
 */
- (void)onGetPermissionState:(int)iError
{
    if (0 == iError) {
        NSLog(@"授权成功");
    }
    else {
        NSLog(@"onGetPermissionState %d",iError);
    }
}

@end
